package service.impl;

import dao.XsbDao;
import entity.XsbEntity;
import org.springframework.stereotype.Service;
import service.XsbService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Lei
 * @create 2021-04-16 16:39
 */
@Service("XsbServiceImpl")
public class XsbServiceImpl implements XsbService {

    @Resource
    private XsbDao xsbDao;

    @Override
    public List<XsbEntity> selectUserList(String xh, String xm) {
        List<XsbEntity> xsbEntities = xsbDao.selectAllRecord(xh,xm);
        return xsbEntities;
    }

    @Override
    public int addUser(XsbEntity xsbEntity) {
        int i = xsbDao.addUser(xsbEntity);
        return i;
    }

    @Override
    public int updateUser(XsbEntity xsbEntity) {
        int i  = xsbDao.updateUser(xsbEntity);
        return i;
    }

    @Override
    public int deleteUser(XsbEntity xsbEntity) {
        int i  = xsbDao.deleteUser(xsbEntity);
        return i;
    }

    @Override
    public XsbEntity selectRecord(String xh) {
        XsbEntity xsbEntity = xsbDao.selectRecord(xh);
        return xsbEntity;
    }
}
